fix: stop spin button at exclusive bound#491
Conversation
Use only inclusive minimum/maximum for the HTML min/max attributes. Exclusive bounds are already enforced by validateField; passing them as the HTML attribute made the spin button stop at a value that validation then rejected. Signed-off-by: Suhrid Marwah <suhridmarwah07@gmail.com>
✅ Deploy Preview for otel-ecosystem-explorer ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Hi @vitorvasc @jaydeluca, |
Signed-off-by: Suhrid Marwah <suhridmarwah07@gmail.com>
|
@suhr25 can you provide steps on how to reproduce this issue? For example, which input do you see this problem occurring on? |
|
in order to help keep track of what is ready for review, i'm going to put this into draft state. Feel free to open it back up when you have added reproduction steps. If you are not able to actually reproduce this issue, then please close the PR. |
|
Thanks, I was able to reproduce this locally. Steps:
Before this PR, the spinner stops at Root cause: // before // after HTML |
|
Thanks for providing reproducer steps and investigating this. After testing your branch against More generally, I want to reiterate feedback I’ve given on a few previous PRs: please try to focus issues and contributions on problems you actually encountered while using the site, or on cases that are likely to impact real users. Many edge cases are technically valid, but every issue and PR still takes maintainer time to investigate, validate, discuss, and maintain. Right now, a number of the recent PRs feel very speculative or extremely low-impact, which makes it difficult for us to prioritize review time effectively. Thanks again for taking the time to contribute, but I don’t think we’ll move forward with this change. |
SUMMARY
Fixes an issue where
NumberInputControltreatedexclusiveMinimum/exclusiveMaximumas HTMLmin/maxvalues. This caused the spin button to stop at values that were actually invalid and immediately failed validation.FIX
Updated
NumberInputControlto only use inclusiveminimumandmaximumvalues for the HTML input attributes. Since HTML number inputs treatminandmaxas inclusive bounds, using exclusive schema constraints was misleading the UI and allowing users to land on invalid values like0for fields that must be greater than0. Added a regression test to ensure exclusive-only constraints no longer set HTMLmin/maxattributes.CHECKLIST
NumberInputControl